import { Component, OnInit } from "@angular/core";
import { Router } from "@angular/router";

@Component({
  selector: "n-root",
  templateUrl: "./app.component.html",
  styleUrls: ["./app.component.scss"]
})
export class AppComponent implements OnInit {
  constructor(private router: Router) {}

  ngOnInit() {
    if (+sessionStorage.getItem("appIsLogin") !== 1) {
      this.router.navigate(["/login"]);
    }
  }
}
